﻿using System;
using System.Collections.Generic;
using System.Text;
using com.gargoylesoftware.htmlunit;
using com.gargoylesoftware.htmlunit.html;

namespace WatiN.Core.HtmlUnit.Handlers
{
	public class HUIncorrectnessListener : IncorrectnessListener
	{

		#region IncorrectnessListener Members

		public void notify(string str, object obj)
		{
			bool show = true;

			if (str.Contains("text/javascript") && str.Contains("Obsolete"))
				show = false;

			if (str.Contains("application/x-javascript"))
				show = false;

			if (show)
				Console.WriteLine(string.Format("INCORRECTNESS: {0}", str));
		}

		#endregion
	}
}
